<?php
    $title="夏丹成2023";
    $bgColor="#777"
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!--    运算-->
    <meta charset="UTF-8">
    <title><?php echo $title?></title>
    <style>
        body{
            font-family: Arial,sans-serif;
            line-height: 1.6;
            margin: 0;
            padding: 0;
            background-color: <?php echo $bgColor?>;
        }
    </style>
</head>

<body>
<?php
//博客内容
    $content="这里时你的博客内容，你可以使用html和css编写自己的网页";
//    发布时间
    $createTime='2023.09.02';
    $navbarArray=[
        [
            "href"=>"home",
            "title"=>"首页"
        ],
        [
            "href"=>"about",
            "title"=>"关于我"
        ],
        [
            "href"=>"posts",
            "title"=>"博客"
        ],
        [
            "href"=>"contact",
            "title"=>"联系我"
        ],
    ]

?>
    <div>
        <a href="#home">首页</a>
        <a href="#about">关于我</a>
        <a href="#posts">博客</a>
        <a href="#contact">联系我</a>
    </div>

<p><?php echo $content?></p>
<span><?php echo $createTime?></span>

<h1>
    <?php
    $abc="xia,dan,cheng ";

    echo <<<EOF
23232$abc dfafdd
EOF;

    ?>

</h1>
<br>
<hr>
<div>
    <?php

        foreach ($navbarArray as $key=>$value){
          echo ' <a href="#'.$value["href"].'">'.$value["title"].'</a>';
        }
        ?>
</div>
<br>
<hr>

</body>
</html>